<template>
  <el-container>
    <el-aside class="el-aside" width="20%">
      <div style="background: #d6ebf1; height: 40px">护理问题</div>
      <el-table :data="nursingList" :show-header="false" border style="width: 100%">
        <el-table-column type="selection"> </el-table-column>
        <el-table-column prop="nursingName"> </el-table-column>
        <el-table-column align="center">
          <template slot-scope="scope">
            <el-button type="text" @click="handleEdit(scope.$index, scope.row)">新增</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-aside>
    <el-main style="margin-top: -20px">
      <div class="nusringEvaluation">
        <h2>护理评估表</h2>
        <el-form :model="detailForm" ref="ruleForm" label-width="200px" class="demo-ruleForm">
          <div class="title">·症状定义性特征</div>
          <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="detailForm.symptom"></el-input>

          <div class="title">·相关因素（导因）/危险因素</div>
          <el-input
            type="textarea"
            :autosize="{ minRows: 2, maxRows: 4 }"
            v-model="detailForm.factors"
          ></el-input>

          <div class="title">·目标</div>
          <el-checkbox-group v-model="detailForm.target">
            <el-checkbox
              v-for="target in targets"
              :label="target"
              :key="target"
              >{{ target }}</el-checkbox
            >
          </el-checkbox-group>
        </el-form>
      </div>
    </el-main>
  </el-container>
</template>

<script>
export default {
  data() {
    return {
      patientId: "",
      nursingList: [
        {
          nursingName: "出血风险",
        },
        {
          nursingName: "血压改变",
        },
      ],
      targets: ["改善", "稳定"],
      detailForm: {
        symptom: "",
        factors: "",
        target: "",
      },
    };
  },
  methods: {
    handleEdit() {},
    // 获取从评估页面得到的护理问题列表
    getParamsNursingList() {
      let patientId = this.$route.params.patientId;
      let nursingProblems = this.$route.params.nursingProblems;
     // 处理nursingProblems
      console.log(patientId);
      console.log(nursingProblems);
    },
  },
  created() {
    this.getParamsNursingList();
  },
};
</script>

<style lang="less" scoped>
.title {
  color: #087c7d;
  background-color: #d6ebf1;
  margin-bottom: 10px;
  margin-top: 10px;
  font-family: PingFang SC;
  font-weight: 600;
  font-size: 16px;
  //  text-align: center; /*水平居中 */
  line-height: 40px; /*垂直居中 */
}
</style>